namespace UniversalAdminSystem.Domian.SystemSettings.ValueObjects;

public record SettingValue
{
    public string Value { get; }
    private SettingValue(string value)
    {
        if (string.IsNullOrWhiteSpace(value))
            throw new ArgumentException("设置值不能为空");
        if (value.Length > 500)
            throw new ArgumentException("设置值不能超过500字符");
        Value = value;
    }
    public static SettingValue Create(string value) => new(value);
    public static implicit operator string(SettingValue val) => val.Value;
} 